﻿using IM.Easy.AuthorizationServices.Dtos;
using IM.Easy.Core.AppContext;
using IM.Easy.Entity.System;
using Mapster;

namespace IM.Easy.Api.Mapper
{
    public class UserMapper : IRegister
    {
        public void Register(TypeAdapterConfig config)
        {
            //当前账户用户映射用户上下文
            config.ForType<UserContext, AccountInfo>()
                    .Map(dest => dest.Id, src => src.Id)
                    .Map(dest => dest.UserName, src => src.UserName)
                    .Map(dest => dest.NickName, src => src.NickName);


        }
    }
}
